import request from "@/utils/request";
// 获取训练员
// 获取已设置的训练员;
export function getschoolCoursetraniner(schoolCourseId) {
  return request({
    url: `/manager/course/schoolCourse/${schoolCourseId}`,
    method: "get",
  });
}

// 获取已设置的训练员;
export function getSettedTrainer(data) {
  return request({
    url: "/manager/order/getTeacherIds",
    method: "get",
    params: data,
  });
}
// 设置训练员
export function setTrainer(data) {
  return request({
    url: "/manager/order/setTeacher",
    method: "put",
    data: data,
  });
}
// 获取自己的门店;
export function getMineSchoolIds(data) {
  return request({
    url: "/system/school/mine/schoolList",
    method: "get",
    params: data,
  });
}
// 正式再用(订单课程)

export function orderCourseList(data) {
  return request({
    url: "/manager/course/orderCourseList",
    method: "get",
    params: data,
  });
}
// 查询详细课程副本
export function queryCourseTemporary(postId) {
  return request({
    url: "/manager/course/courseTemporary/" + postId,
    method: "get",
  });
}
// 复制课程
export function copyCourse(data) {
  return request({
    url: "/teacher/homePageCourse/copy",
    method: "post",
    data: data,
  });
}
// 复制课程副本
export function copyCourseTemporary(data) {
  return request({
    url: "/teacher/homePageCourse/temporaryCopy",
    method: "post",
    data: data,
  });
}
// 新增课程副本
export function addCourseTemporary(data) {
  return request({
    url: "/manager/course/addCourseTemporary",
    method: "post",
    data: data,
  });
}

// 修改课程副本
export function editCourseTemporary(data) {
  return request({
    url: "/manager/course/editCourseTemporary",
    method: "put",
    data: data,
  });
}
// 课程副本草稿-是否专业人员(新！！！)

export function CourseTemporaryisProfessional(userId) {
  return request({
    url: `/manager/course/courseTemporary/isProfessional/${userId}`,
    method: "get",
  });
}
// 课程副本草稿-提交和撤销(新！！！)

export function submitCourseTemporary(temporaryId, state) {
  return request({
    url: `/manager/course/temporary/submit/${temporaryId}/${state}`,
    method: "put",
  });
}
// 课程副本-审核(新！！！)
export function reviewCourseTemporary(data) {
  return request({
    url: "/manager/course/reviewCourseTemporary",
    method: "put",
    data: data,
  });
}
// 课程副本-课程副本-审核前置校验(新！！！)
export function reviewCourseTemporarybeforeCheck(data) {
  return request({
    url: "/manager/course/reviewCourseTemporary/beforeCheck",
    method: "get",
    params: data,
  });
}
// 撤销提交审核
export function revokeCourseTemporary(id) {
  return request({
    url: "/manager/course/backSubmit/" + id,
    method: "put",
  });
}
// 删除课程副本
export function delCourseTemporary(postId) {
  return request({
    url: "/manager/course/courseTemporary/" + postId,
    method: "delete",
  });
}

// 课程副本列表
export function listCourseTemporary(data) {
  return request({
    url: "/manager/course/courseTemporaryList/list",
    method: "get",
    params: data,
  });
}

// 查询列表
export function listPost_course(query) {
  return request({
    url: "/manager/course/list",
    method: "get",
    params: query,
  });
}

// 查询详细
export function getPost_course(postId) {
  return request({
    url: "/manager/course/" + postId,
    method: "get",
  });
}
// 教师评价学生详情
export function getPost_teaEvaluateInfo(postId) {
  return request({
    url: "/teacher/homePageCourse/teaEvaluateInfo/" + postId,
    method: "get",
  });
}
// 课程-学生评价详情
export function getPost_evaluateInfo(postId) {
  return request({
    url: "/teacher/homePageCourse/evaluateInfo/" + postId,
    method: "get",
  });
}
// 课程-获取详细信息
// 数据详情-基础统计数据
export function getPost_courseStuDataBase(data) {
  return request({
    url: "/manager/course/courseStuDataBase",
    method: "get",
    params: data,
  });
}
// 数据详情授权门店
export function getPost_courseSchoolList(data) {
  return request({
    url: "/manager/course/schoolList",
    method: "get",
    params: data,
  });
}
// 数据详情学习记录
export function getPost_courseStudyList(data) {
  return request({
    url: "/manager/course/studyList",
    method: "get",
    params: data,
  });
}
// 数据详情评价记录
export function getPost_courseEvaluateList(data) {
  return request({
    url: "/student/courseStudyManager/courseEvaluateList",
    method: "get",
    params: data,
  });
}
// 课程-获取学习详细信息
export function getPost_courseStuData(query) {
  return request({
    url: "/manager/course/courseStuData",
    method: "get",
    params: query,
  });
}
// 新增
export function addPost_course(data) {
  return request({
    url: "/manager/course",
    method: "post",
    data: data,
  });
}

// 修改
export function updatePost_course(data) {
  return request({
    url: "/manager/course/updateCourseStatus",
    method: "put",
    data: data,
  });
}

// 删除
export function delPost_course(postId) {
  return request({
    url: "/manager/course/" + postId,
    method: "delete",
  });
}
